package com.itheima.zhuanhuan;

import java.io.*;
import java.nio.charset.Charset;

public class Demo01 {

    public static void main(String[] args) throws IOException {
        String  s="嘿嘿嘿,我最帅";

       /* FileOutputStream fos = new FileOutputStream("day13\\bbb.txt");

        fos.write(s.getBytes("GBK"));
        fos.close();*/
        //FileWriter writer = new FileWriter("day13\\ddd.txt", Charset.forName("GBK"));
        //FileWriter writer = new FileWriter("day13\\ddd.txt");
        OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream("day13\\fff.txt"),"GBK");
        writer.write(s);
        writer.close();

    }
}
